import json
import csv
from getDataByUrl  import *
import time

print("----start\n")
while True:

    # write_to_csv(averages)
    try:

        save_into_db()
    
    except e:
        print("error:",e)
    finally:

        time.sleep(120) #暂停10秒